
 package com.ami.vmedia.gui;
 
 import com.ami.iusb.IUSBRedirSession;
 import com.ami.kvm.jviewer.gui.LocaleStrings;
 import com.ami.vmedia.VMApp;
 import java.awt.GridBagConstraints;
 import java.awt.GridBagLayout;
 import java.awt.Insets;
 import javax.swing.BorderFactory;
 import javax.swing.JPanel;
 import javax.swing.JScrollPane;
 import javax.swing.JTable;
 import javax.swing.border.Border;
 import javax.swing.border.TitledBorder;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 public class StatusTabPanel
   extends JPanel
 {
   private StatusTable cdStatusTable;
   private StatusTable fdStatusTable;
   private StatusTable hdStatusTable;
   private JScrollPane vmCDScrollPane;
   private JScrollPane vmFDScrollPane;
   private JScrollPane vmHDScrollPane;
   
   public StatusTabPanel()
   {
     super(new GridBagLayout());
     GridBagConstraints localGridBagConstraints = new GridBagConstraints();
     localGridBagConstraints.insets = new Insets(2, 0, 2, 0);
     localGridBagConstraints.gridx = 0;
     localGridBagConstraints.fill = 1;
     localGridBagConstraints.ipady = 400;
     localGridBagConstraints.gridy = 0;
     localGridBagConstraints.gridwidth = 1;
     localGridBagConstraints.gridheight = 1;
     localGridBagConstraints.weightx = 1.0D;
     localGridBagConstraints.weighty = 1.0D;
     setVMCDScrollPane(createStatusScrollPane(0));
     add(getVMCDScrollPane(), localGridBagConstraints);
     localGridBagConstraints.gridy = 1;
     setVMFDScrollPane(createStatusScrollPane(1));
     add(getVMFDScrollPane(), localGridBagConstraints);
     localGridBagConstraints.gridy = 2;
     setVMHDScrollPane(createStatusScrollPane(2));
     add(getVMHDScrollPane(), localGridBagConstraints);
     setVisible(true);
   }
   
 
 
 
 
 
 
 
 
 
 
   public JScrollPane createStatusScrollPane(int paramInt)
   {
     Border localBorder = BorderFactory.createEtchedBorder();
     TitledBorder localTitledBorder = null;
     String str = "";
     StatusTable localStatusTable = new StatusTable(paramInt);
     JScrollPane localJScrollPane = new JScrollPane(localStatusTable.getStatusTable(), 20, 30);
     
 
     switch (paramInt) {
     case 0: 
       setCDStatusTable(localStatusTable);
       str = LocaleStrings.getString("AK_3_VMP") + " " + LocaleStrings.getString("AK_2_VMP");
       break;
     case 1: 
       setFDStatusTable(localStatusTable);
       str = LocaleStrings.getString("AK_4_VMP") + " " + LocaleStrings.getString("AK_2_VMP");
       break;
     case 2: 
       setHDStatusTable(localStatusTable);
       str = LocaleStrings.getString("AK_5_VMP") + " " + LocaleStrings.getString("AK_2_VMP");
     }
     
     localTitledBorder = BorderFactory.createTitledBorder(localBorder, str, 0, 1);
     
 
 
 
     localJScrollPane.setBorder(localTitledBorder);
     return localJScrollPane;
   }
   
 
 
 
 
 
 
 
 
   public void updateStatusTable(int paramInt1, int paramInt2, boolean paramBoolean)
   {
     IUSBRedirSession localIUSBRedirSession = VMApp.getInstance().getIUSBRedirSession();
     JTable localJTable = null;
     String str1 = LocaleStrings.getString("AL_8_ST");
     String str2 = LocaleStrings.getString("AL_8_ST");
     switch (paramInt1) {
     case 0: 
       localJTable = getCDStatusTable().getStatusTable();
       if (paramBoolean) {
         str1 = LocaleStrings.getString("AL_5_ST") + " : " + localIUSBRedirSession.getCDInstanceNumber(paramInt2);
       }
       break;
     case 1: 
       localJTable = getFDStatusTable().getStatusTable();
       if (paramBoolean) {
         str1 = LocaleStrings.getString("AL_6_ST") + " : " + localIUSBRedirSession.getFDInstanceNumber(paramInt2);
       }
       break;
     case 2: 
       localJTable = getHDStatusTable().getStatusTable();
       if (paramBoolean) {
         str1 = LocaleStrings.getString("AL_7_ST") + " : " + localIUSBRedirSession.getHDInstanceNumber(paramInt2);
       }
       break;
     }
     if (paramBoolean) {
       str2 = localIUSBRedirSession.getDeviceRedirSource(paramInt1, paramInt2);
     } else {
       str2 = LocaleStrings.getString("AL_8_ST");
       str1 = LocaleStrings.getString("AL_8_ST");
     }
     localJTable.setValueAt(str1, paramInt2, 1);
     localJTable.setValueAt(str2, paramInt2, 2);
   }
   
 
 
   public StatusTable getCDStatusTable()
   {
     return this.cdStatusTable;
   }
   
 
 
   public void setCDStatusTable(StatusTable paramStatusTable)
   {
     this.cdStatusTable = paramStatusTable;
   }
   
 
 
   public StatusTable getFDStatusTable()
   {
     return this.fdStatusTable;
   }
   
 
 
   public void setFDStatusTable(StatusTable paramStatusTable)
   {
     this.fdStatusTable = paramStatusTable;
   }
   
 
 
   public StatusTable getHDStatusTable()
   {
     return this.hdStatusTable;
   }
   
 
 
   public void setHDStatusTable(StatusTable paramStatusTable)
   {
     this.hdStatusTable = paramStatusTable;
   }
   
 
 
   public JScrollPane getVMCDScrollPane()
   {
     return this.vmCDScrollPane;
   }
   
 
 
   public void setVMCDScrollPane(JScrollPane paramJScrollPane)
   {
     this.vmCDScrollPane = paramJScrollPane;
   }
   
 
 
   public JScrollPane getVMFDScrollPane()
   {
     return this.vmFDScrollPane;
   }
   
 
 
   public void setVMFDScrollPane(JScrollPane paramJScrollPane)
   {
     this.vmFDScrollPane = paramJScrollPane;
   }
   
 
 
   public JScrollPane getVMHDScrollPane()
   {
     return this.vmHDScrollPane;
   }
   
 
 
   public void setVMHDScrollPane(JScrollPane paramJScrollPane)
   {
     this.vmHDScrollPane = paramJScrollPane;
   }
   
 
 
 
 
 
 
   public JScrollPane getDeviceScrollPane(int paramInt)
   {
     JScrollPane localJScrollPane = null;
     switch (paramInt) {
     case 0: 
       localJScrollPane = getVMCDScrollPane();
       break;
     case 1: 
       localJScrollPane = getVMFDScrollPane();
       break;
     case 2: 
       localJScrollPane = getVMHDScrollPane();
     }
     
     return localJScrollPane;
   }
 }


/* Location:              D:\Users\tianlin\Downloads\JViewer.jar!\com\ami\vmedia\gui\StatusTabPanel.class
 * Java compiler version: 5 (49.0)
 * JD-Core Version:       0.7.1
 */